<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>待办流程</title>
</head>
<style type="text/css">
</style>
<body>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
	<script type="text/javascript">
		function go_seeimg(taskId) {
			window.open("<%=basePath %>seeimg?taskId=" + taskId);
		}
		$(function() {
			$("#backlogdg").datagrid({
				onBeforeLoad : function(param) {
					param.processID = $("#processID").val();
					param.empName = $("#empName").val();
					param.processType = $("#processType").val();
				}
			})
			$("#query").linkbutton({
				onClick : function() {
					$('#backlog_search_from').form('submit', {
						onSubmit : function(param) {
							param.page = '1';
							param.rows = '10';
						},
						success : function(data) { //表单查询数据刷新DataGrid
							var resultData = $.parseJSON(data);
							$('#backlogdg').datagrid('loadData', resultData);
						}
					});
				}
			});
		})
	</script>
	<div
		style="width: 99%; height: 99%; border: 1px solid white; background: white">
		<div style="margin: 10px; height: 8%">
			<form action="find_my_task" id="backlog_search_from" method="get">
				<input id="processID" name="processID" class="easyui-textbox"
					style="width: 20%;" label="流程编号：" labelAlign="right">
				<input id="empName" name="empName" class="easyui-textbox"
					style="width: 20%;" label="流程发起人：" labelAlign="right">
				<select id="processType" name="processType" class="easyui-combobox"
					style="width: 20%;" label="流程类别：" editable="false" labelAlign="right">
					<option value="">--请选择--</option>
					<option value="人员录用流程">录用申请单</option>
					<option value="人员转正流程">转正申请单</option>
					<option value="人员借款流程">借款申请单</option>
					<option value="人员请假流程">请假申请单</option>
					<option value="人员调动流程">调动申请单</option>
					<option value="人员还款流程">还款申请单</option>
					<option value="人员加班流程">加班申请单</option>
					<option value="人员离职流程">离职申请单</option>
					<option value="通知发布流程">通知申请单</option>
				</select>
				<a id="query" class="easyui-linkbutton button-line-blue"
					style="width: 10%; height: 30px; margin-left: 20px">检索</a>
			</form>
		</div>
		<!-- toolbar: '#tb' -->
		<table id="backlogdg" style="width: 99%; height: 88%"
			data-options="
				url:'find_my_task',
				autoRowHeight:true,
				striped:true,
				pagination:true,
				rownumbers:true,
				singleSelect:true,
				remoteSort:false,
				pageSize:10,
				pageList:[10,15]
			">
			<thead>
				<tr>
					<th style="width: 10%" align="center"
						data-options="field:'processId',sortable:true">流程编号</th>
					<th style="width: 15%" align="center" data-options="field:'processName'">流程名称</th>
					<th style="width: 10%" align="center" data-options="field:'launchPeople'">流程发起人</th>
					<th style="width: 13%" align="center"
						data-options="field:'launchTime',sortable:true">流程发起时间</th>
					<th style="width: 16%" align="center"
						data-options="field:'taskName',sortable:true">当前任务</th>
					<th style="width: 13%" align="center"
						data-options="field:'startTime',sortable:true">任务开始时间</th>
					<th style="width: 24%" align="center"
						data-options="field:'other',formatter:otherFuns">操作</th>
				</tr>
			</thead>
			<tbody>
			</tbody>
		</table>
		<div id="win-handle-do" class="easyui-window" title="办理流程"
			data-options="collapsible:false,minimizable:false,maximizable:false,modal:true,iconCls:'icon-form',closed:true"
			style="width: 60%; height: 90%; padding: 5px">
			<div id="win-handle-do-layout" class="easyui-layout" data-options="fit:true">
				<div id="win-handle-do-layout-center" data-options="region:'center'"
					align="center" style="padding: 10px;"></div>
				<div data-options="region:'south',border:false"
					style="text-align: right; padding: 5px 0 0;">
					<a class="easyui-linkbutton" data-options="iconCls:'icon-ok', plain:true"
						href="javascript:void(0)" onclick="goHandle()">办理</a>
					<a class="easyui-linkbutton"
						data-options="iconCls:'icon-cancel', plain:true" href="javascript:void(0)"
						onclick="$('#win-handle-do').window('close');">取消</a>
				</div>
			</div>
		</div>
		
		
		<div id="win-all-handler" class="easyui-window" title="流程执行者"
			data-options="collapsible:false,minimizable:false,maximizable:false,modal:true,iconCls:'icon-form',closed:true"
			style="width: 50%; height: 70%; padding: 5px">
			<div id="win-all-handler-layout" class="easyui-layout" data-options="fit:true">
				<div id="win-all-handler-layout-center" data-options="region:'center'"
					align="center" style="padding: 10px;">
					<div id="win-all-handler-layout-center-dg"></div>	
				</div>
				<div data-options="region:'south',border:false"
					style="text-align: right; padding: 5px 0 0;">
					<a class="easyui-linkbutton"
						data-options="iconCls:'icon-cancel', plain:true" href="javascript:void(0)"
						onclick="$('#win-all-handler').window('close');">取消</a>
				</div>
			</div>
		</div>
		
		
	</div>
</body>
</html>